package com.ruoyi.common.utils;

/**
 * 通用常量信息
 *
 * @author luxdo
 */
public class Constants
{
    /**
     * UTF-8 字符集
     */
    public static final String UTF8 = "UTF-8";

    /**
     * GBK 字符集
     */
    public static final String GBK = "GBK";

    /**
     * http请求
     */
    public static final String HTTP = "http://";

    /**
     * https请求
     */
    public static final String HTTPS = "https://";

    /**
     * rmi
     */
    public static final String RMI = "rmi ";

    /**
     * ldap
     */
    public static final String LDAP = "ldap ";

    /**
     * 通用成功标识
     */
    public static final String SUCCESS = "0";

    /**
     * 通用失败标识
     */
    public static final String FAIL = "1";

    /**
     * 登录成功
     */
    public static final String LOGIN_SUCCESS = "Success";

    /**
     * 注销
     */
    public static final String LOGOUT = "Logout";

    /**
     * 登录失败
     */
    public static final String LOGIN_FAIL = "Error";

    /**
     * 注册失败
     */
    public static final String REGISTER_FAIL = "Error";


    /**
     * 验证码 redis key
     */
    public static final String CAPTCHA_CODE_KEY = "captcha_codes:";

    /**
     * 登录用户 redis key
     */
    public static final String LOGIN_TOKEN_KEY = "login_tokens:";

    /**
     * 防重提交 redis key
     */
    public static final String REPEAT_SUBMIT_KEY = "repeat_submit:";

    /**
     * 验证码有效期（分钟）
     */
    public static final Integer CAPTCHA_EXPIRATION = 2;

    /**
     * 令牌
     */
    public static final String TOKEN = "token";

    /**
     * 令牌前缀
     */
    public static final String TOKEN_PREFIX = "Bearer ";

    /**
     * 令牌前缀
     */
    public static final String LOGIN_USER_KEY = "login_user_key";

    /**
     * 用户ID
     */
    public static final String JWT_USERID = "userid";

    /**
     * 用户名称
     */
    public static final String JWT_USERNAME = "sub";

    /**
     * 用户头像
     */
    public static final String JWT_AVATAR = "avatar";

    /**
     * 创建时间
     */
    public static final String JWT_CREATED = "created";

    /**
     * 用户权限
     */
    public static final String JWT_AUTHORITIES = "authorities";

    /**
     * 参数管理 cache key
     */
    public static final String SYS_CONFIG_KEY = "sys_config:";

    /**
     * 字典管理 cache key
     */
    public static final String SYS_DICT_KEY = "sys_dict:";

    /**
     * 资源映射路径 前缀
     */
    public static final String RESOURCE_PREFIX = "/profile";

    /**
     * websocket 地址
     */
    public static final String WEBSOCKET_ENDPOINT = "/ws";

    /**
     * websocket 广播地址前缀
     */
    public static final String WEBSOCKET_PREFIX = "/sendToMessage";

    /**
     * 消息通知类型（流程通知）
     */
    public static final String MSG_NOTIFY_TYPE_FLOW = "1";

    /**
     * 日历
     */
    public static final String CALENDAR = "CALENDAR";

    /**
     * 日历(是节假日)
     */
    public static final String CALENDAR_JJR = "1";

    /**
     * 日历(工作日)
     */
    public static final String CALENDAR_GZR = "1";
    /**
     * 日历(自然日)
     */
    public static final String CALENDAR_ZZR = "2";

    public static final String LOCAL_DATE_TIME = "DateTime";

    public static final String LOCAL_DATE = "Date";

    /**
     * 业务类型;1、投诉；2、举报；3、咨询；4、表扬 5、信访；
     * ！！！！！！！！ZhzxConstant类也有该常量，记得同步修改
     */
    public static final String YWLX_TS = "1";
    public static final String YWLX_JB = "2";
    public static final String YWLX_ZX = "3";
    public static final String YWLX_BY = "4";

    public static final String YWLX_XF = "5";

    /**
     * 网格等级：1、市；2、乡镇；3、村
     */
    public static final String REGION_LEVEL_ONE = "1";

    public static final String REGION_LEVEL_TWO = "2";

    public static final String REGION_LEVEL_THREE = "3";

    /**
     * 政企互动-问题采集统计类型
     * 1：单位；2：个人;3:专项
     */
    public static final String COLLECTION_STATIC_TYPE_DEPT = "1";

    public static final String COLLECTION_STATIC_TYPE_PERSON = "2";

    public static final String COLLECTION_STATIC_TYPE_SPECIAL = "3";

    /**
     * 用户名长度限制
     */
    public static final int USERNAME_MIN_LENGTH = 2;
    public static final int USERNAME_MAX_LENGTH = 20;

    /**
     * 密码长度限制
     */
    public static final int PASSWORD_MIN_LENGTH = 5;
    public static final int PASSWORD_MAX_LENGTH = 20;

    /** 校验返回结果码 */
    public final static String UNIQUE = "0";
    public final static String NOT_UNIQUE = "1";

    public final static String PCOMPANY_REDIS = "pcompanyRedis";

    /**
     * 食品企业主体 cache key
     */
    public static final String FOOD_COMPANY_KEY = "foodCompany:";

    /**
     * actionTime redis key
     */
    public static final String REDIS_ACTIONTIME="redis_actiontime";

    /**
     * 默认手机短信验证码 redis key
     */
    public static final String BASE_PHONE_SMS_CODE = "telcode_";

    /**
     * 专利手机短信验证码 redis key
     */
    public static final String PATENT_PHONE_SMS_CODE = "patent_";

    /**
     * 默认手机短信验证码 redis 缓存分钟
     */
    public static final Integer BASE_SMS_REDIS_CACHE_MINUTE = 5;

    /**
     * 同一号码每天最大短信次数
     */
    public static final Integer SMS_PHONE_SEND_MAX_SIZE = 10;

    /**
     * 登录用户编号 redis key
     */
    public static final String LOGIN_USERID_KEY = "login_userid:";

}